public class Baidu implements Observer{
    private double temperature;
    private double pressure;
    private double humidity;



    @Override
    public void update(double temperrature, double pressure, double humidity) {
        this.temperature = temperrature;
        this.pressure = pressure;
        this.humidity = humidity;
        display();
    }

    private void display() {
        System.out.println("百度-------温度为 "+ temperature + "度--------");
        System.out.println("百度-------气压为 "+ pressure + "帕--------");
        System.out.println("百度-------湿度为 "+ humidity + "%--------");
    }
}
